/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.srcptit.trainning.b1;

import java.util.Scanner;

/**
 *
 * @author Administrator
 */
public class B3_ThuaSoNguyenTo {
    public static void main(String[] args) {
        long n;
        Scanner sc = new Scanner(System.in);
        System.out.print("Nhập n = ");
        n = sc.nextLong();
        System.out.print(n+" = ");
        analysis(n);
    }
    static void analysis(long n){
        String s = "";
        long i = 2;
        while(n!=1 && i<n){
            while(n%i==0){
                s = s  + i + "x";
                n=n/i;
            }
            i++;
        }
        s = s + n;
        System.out.println(s);
    }
}
